from flask import request
import json

def getArgs(t):
    a = None
    d = request.json
    if d is not None:
        a = d.get(t)
    if a is None:
        a = request.args.get(t)
    if a is  None :
        a = request.form.get(t)
    if a is None:
        a = json.loads(request.data.decode('utf-8')).get(t)
    return a